import { Routes, RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { TabsPage } from './tabs/tabs.page';
import { HomePage } from './home/home/home.page';

const routes: Routes = [
  {
    path: 'tabs',
    component: TabsPage,
    children: [
      {
        path: 'home',
        outlet: 'home',
        component: HomePage
      },
      {
        path: 'market',
        outlet: 'market',
        component: HomePage
      },
      {
        path: '',
        redirectTo: '/tabs/(home:home)',
        pathMatch: 'full',
      }
    ]
  },
  { path: 'home', loadChildren: './home/home.module#HomeModule' },
  { path: '', redirectTo: '/tabs/(home:home)', pathMatch: 'full' },
  { path: '**', redirectTo: '/tabs/(home:home)', pathMatch: 'full' }

];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class RoutesRoutingModule { }
